<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>getJSON Button Does $getJSON</title>
<script src="../js/jquery-1.3.2.js"></script>
<script>
function getJSONFromAction() {
   $.getJSON("/struts2Fill/receiveJSONFromExampleAction.action", function(json){
	   alert("JSON Data from JSONExample.java: \n  " 
			   + json.field1 + "\n  "
			   + json.ints   + "\n  "
			   + json.map['John'] + "\n  "
			   + json.newName + "\n  "
			   );
   });
}

</script>

</head>
<body>
    <input type="button" value="getJSON" onclick="getJSONFromAction();"/> <p/>
</body>
</html>
